home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / dflat8.zip / CLASSDEF.C < prev    next >
Text File  |  1991-09-30  |  3KB  |  101 lines

  1. /* ---------------- classdef.c ---------------- */
  2.  
  3. #include <stdio.h>
  4. #include "dflat.h"
  5.  
  6. /*
  7.  * Add class definitions to this table.
  8.  * Add the class symbol to the CLASS list in dflat.h
  9.  */
  10.  
  11. CLASSDEFS classdefs[] = {
  12.     {   /* ---------- NORMAL Window Class ----------- */
  13.         NORMAL,
  14.         -1,
  15.         NormalProc
  16.     },
  17.     {   /* ---------- APPLICATION Window Class ----------- */
  18.         APPLICATION,
  19.         NORMAL,
  20.         ApplicationProc,
  21.         VISIBLE | SAVESELF | CONTROLBOX
  22.     },
  23.     {   /* ------------ TEXTBOX Window Class -------------- */
  24.         TEXTBOX,
  25.         NORMAL,
  26.         TextBoxProc
  27.     },
  28.     {   /* ------------- LISTBOX Window class ------------- */
  29.         LISTBOX,
  30.         TEXTBOX,
  31.         ListBoxProc
  32.     },
  33.     {   /* ------------- EDITBOX Window Class -------------- */
  34.         EDITBOX,
  35.         TEXTBOX,
  36.         EditBoxProc
  37.     },
  38.     {   /* ------------- MENUBAR Window Class --------------- */
  39.         MENUBAR,
  40.         NORMAL,
  41.         MenuBarProc,
  42.         VISIBLE | NOCLIP
  43.     },
  44.     {   /* ------------- POPDOWNMENU Window Class ----------- */
  45.         POPDOWNMENU,
  46.         LISTBOX,
  47.         PopDownProc,
  48.         SAVESELF | NOCLIP | HASBORDER
  49.     },
  50.     {   /* ----------- BUTTON Window Class --------------- */
  51.         BUTTON,
  52.         TEXTBOX,
  53.         ButtonProc,
  54.         SHADOW | NOCLIP
  55.     },
  56.     {   /* ------------- DIALOG Window Class -------------- */
  57.         DIALOG,
  58.         NORMAL,
  59.         DialogProc,
  60.         SHADOW | MOVEABLE | CONTROLBOX | HASBORDER | NOCLIP
  61.     },
  62.     {   /* ------------ ERRORBOX Window Class ----------- */
  63.         ERRORBOX,
  64.         DIALOG,
  65.         DialogProc,
  66.         SHADOW | HASBORDER
  67.     },
  68.     {   /* --------- MESSAGEBOX Window Class ------------- */
  69.         MESSAGEBOX,
  70.         DIALOG,
  71.         DialogProc,
  72.         SHADOW | HASBORDER
  73.     },
  74.     {   /* ----------- HELPBOX Window Class --------------- */
  75.         HELPBOX,
  76.         DIALOG,
  77.         HelpBoxProc,
  78.         SHADOW | MOVEABLE | SAVESELF | HASBORDER | NOCLIP | CONTROLBOX
  79.     },
  80.     {   /* -------------- DUMMY Window Class ---------------- */
  81.         DUMMY,
  82.         -1,
  83.         NULL,
  84.         HASBORDER
  85.     }
  86. };
  87.  
  88. /* ------- return the offset of a class into the class
  89.                  definition table ------ */
  90. int FindClass(CLASS class)
  91. {
  92.     int i;
  93.     for (i = 0; i < sizeof(classdefs) / sizeof(CLASSDEFS); i++)
  94.         if (class == classdefs[i].class)
  95.             return i;
  96.     return 0;
  97. }
  98.  
  99.  
  100.  
  101.